/**
 * @description 公用部分相关接口
 */
import request from '@/utils/request'
import qs from 'qs'

/**
 * 删除附件
 * @param data
 * @returns {*}
 */
export function deleteAttachment(data) {
  return request({
    url: 'admin/attachment/deleteAttachment.do',
    method: 'POST',
    data: qs.stringify(data)
  })
}

/**
 * 获取所有行政区划
 * @export
 * @return {Object}
 */
export const getDistrict = () => {
  return request({
    url: 'admin/district/getDistrict.do',
    method: 'POST'
  })
}

/**
 * 获取所有环保部门
 * @return {*}
 */
export function getDepartment() {
  return request({
    url: 'admin/department/getDepartment.do',
    method: 'POST'
  })
}

/**
 *
 * 获取所有用户类型
 * @export
 * @return {Object} 返回用户类型数组
 */
export function getAllUserType() {
  return request({
    url: '/admin/user/getAllUserType.do',
    method: 'POST'
  })
}

/**
 *
 * 获取所属单位
 * @export
 * @return {Object} 返回用户类型数组
 */
export function selectDepartmentList() {
  return request({
    url: '/admin/department/selectDepartmentList.do',
    method: 'POST'
  })
}
